Sometimes you will wish to attach a reference mark to a word
which is immediately followed by a comma.
This presents you with two choices neither of which produce
truly satisfactory text.
If you type
… this is the place,
refend
you get
… this is the place,
and if you type
… this is the place
refend,
you get
… this is the place,
In the first case the reference mark is really attached to the
comma, causing an unsightly extra amount of space;
in the second case the reference mark separates the word from
the comma, which is even worse.
The way out of this predicament is to make use of Knuth's
command
rlap
If you type
… this is the place
rlap,
refend
you get
… this is the place,
which is much better.
Obviously the same trick applies to the macros
refsend,
refmark,
ref,
Ref and
attach.
Because of the way references work you always get a single
space after an attached reference.
Basically this means that if you attach the reference mark to
the last word in a sentence, the next sentence will start too
close.
There is a way out of this dilemma.
Type
the end of the world
rlap.
refend
The next
which will produce
the end of the world. The next
The
forces more space between the sentences.
Finally, if you need a reference followed by a colon and want
to get rid of the extra space that the reference macro puts in
simply type
refend
unskip.
The command
unskip is a Knuth construct which eats
the last extra space you entered.
(Actually, it eats the last bit of glue that
was inserted into the text, but that is a matter for TEXperts.)